

def test_list():
    result = [
        {"a": "1", "b": "2", "c": "3"},
        # {"a": "4", "b": "5", "c": "6"},
    ]
    flaws = [202,203,204]
    flaws = [str(item) for item in flaws]
    for index, result_item in enumerate(result):
        if index < len(flaws):
            if index == len(result) - 1:
                result_item["flaw_id"] = ",".join(flaws[index:])
            else:
                result_item["flaw_id"] = flaws[index]


    return result, flaws


result, flaws = test_list()
print(f"---------result:{result}")
print(f"---------flaws:{flaws}")